﻿@{
    Layout = "/Views/Shared/_Layout.cshtml";
}

<style type="text/css">
    * {
        margin: 0;
        padding: 0;
    }

    html, body {
        height: 100%;
    }

    input, button, a {
        outline: none;
    }

    #wrapper {
        display: table;
    }

    #cell {
        display: table-cell;
        vertical-align: middle;
    }

    .bgimg {
        height: 100%;
        width: 100%;
        background: url(/Assets/Images/bj.jpg) no-repeat;
    }

        .bgimg .name {
            width: 100%;
            padding-left: 15%;
        }

            .bgimg .name > div {
                float: left;
            }

            .bgimg .name .line {
                margin-top: 20px;
                margin-right: 20px;
            }

            .bgimg .name .txt {
                color: white;
                font-size: 70px;
                vertical-align: middle;
                margin-top: 12px;
            }
    /*登陆*/
    .land {
        width: 100%;
    }

    .border {
        background: url(/Assets/Images/dl_1.png) no-repeat;
        height: 665px;
        width: 660px;
        background-size: 100% 80%;
        background-position-y: 50px;
        float: right;
        margin-right: 100px;
        margin-top: 150px;
    }

        .border .contant {
            height: 520px;
            width: 580px;
            padding-bottom: 50px;
            margin: auto;
            background-color: rgba(4, 28, 46, 0.9);
        }

    .headimg {
        height: 75px;
        width: 105px;
        margin: auto;
        position: relative;
        top: 65px;
    }

        .headimg img {
            height: 100%;
            width: 100%;
        }

    .input {
        width: 460px;
        height: 140px;
        margin: auto;
        position: relative;
        top: 130px;
    }

        .input input {
            border: 1px solid white;
            background-color: black;
            height: 70px;
            width: 100%;
            padding-left: 60px;
            color: white;
        }

        .input .word {
            border-bottom: 0;
            background-image: url(/Assets/Images/fyyh.png);
            background-size: 15px;
            background-repeat: no-repeat;
            background-position: 20px 25px;
        }

        .input .password {
            background-image: url(/Assets/Images/fymm.png);
            background-size: 15px;
            background-repeat: no-repeat;
            background-position: 20px 25px;
        }

        .input .checkbox {
            width: 13px;
            height: 13px;
            display: inline;
        }

        .input .check {
            margin-top: 20px;
        }

        .input span {
            color: white;
            margin-left: 10px;
        }

    .land-btn {
        width: 450px;
        height: 50px;
        background-color: #5b8cff;
        border-radius: 5px;
        margin: 40px auto 0;
        text-align: center;
        color: white;
        line-height: 50px;
        font-size: 16px;
    }
</style>

<body>
    <div class="bgimg" id="wrapper">
        <div id="cell">
            <div class="name">
                <div class="line">
                    <img src="/Assets/Images/shutiao.png" />
                </div>
                <div class="txt">
                    <div class="top">
                        信链检验
                    </div>
                    <div class="bottom">
                        检测机构联盟管理平台
                    </div>
                </div>
            </div>
        </div>

        <div id="cell">
            <div class="land">
                <div class="border">
                    <div class="contant">
                        <div class="headimg">
                            <img src="/Assets/Images/logo.png" />
                        </div>
                        <form method="post" id="loginForm" class="m-t login">
                            <div class="input">
                                <input type="text" class="form-control uname word" name="account" placeholder="用户名" required="">
                                <input type="password" class="form-control password" name="password" placeholder="密码" required="">
                                <div class="check">
                                    <input class="checkbox" type="checkbox" name="" id="" value="" /><span>记住密码</span>
                                </div>
                                <div class="land-btn" onclick="sub()">
                                    登 录
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>

    </div>
</body>

<script>
    function sub() {
        var acc = $("input[name='account']").val();
        var pwd = $("input[name='password']").val();
        if (acc != null && pwd != "" && acc != "" && pwd != null) {
            $('.land-btn').text('登录中...');
            $.ajax({
                type: "POST",
                url: "/login/login",
                data: $("#loginForm").serialize(),
                success: function (msg) {
                    if (msg != "ok") {
                        $('.land-btn').text('登录');
                        alert(msg);
                    }
                    else {
                        setTimeout(function () {
                            window.location.href = "/login/LoginTo";
                        }, 1000);
                    }
                }
            });
        } else {
            alert('请输入用户名和密码', 7);
        }

    }

    //回车提交事件
    $("body").keydown(function () {
        if (event.keyCode == "13") {
            sub();
        }
    });  


</script>







